package object1;

public class Computer {
    public String brand;   //品牌
    protected String cpu;     //cpu型号
    String memory;  //内存大小
    private String screen;  //屏幕规格

    public Computer(){
        this("联想", "AMD R7", "8g", "13*14");
    }

    public Computer(String brand, String cpu, String memory, String screen) {
        this.brand = brand;
        this.cpu = cpu;
        this.memory = memory;
        this.screen = screen;
    }

    public void boot(){
        System.out.println("开机");
    }

    public void powerOff(){
        System.out.println("关机");
    }

    public void surf(){
        System.out.println("上网");
    }
}
